package a.f.l;

import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.m;
import a.c.n;
import a.c.v;
import a.c.x;
import a.c.z;
import a.f.*;
import a.f.cb;
import a.f.g.l;
import a.f.o;
import a.f.q;
import a.f.r;
import a.i.nb;

import java.awt.geom.Rectangle2D;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class e
  extends r
{
  static final Object g = "EdgeGroupRouterStage#BUSNODE_DPKEY";
  static final Object h = "VERTICAL_BUS";
  static final Object i = "HORIZONTAL_BUS";
  private boolean j = false;
  private double k = 15.0D;
  public static boolean l;
  
  public double b()
  {
    return this.k;
  }
  
  public void a(double paramDouble)
  {
    this.k = paramDouble;
  }
  
  public e(rc paramrc)
  {
    a(paramrc);
  }
  
  public boolean canLayout(o paramo)
  {
    return a().canLayout(paramo);
  }
  
  public void doLayout(o paramo)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    g localg = c();
    if (localg == null) {
      throw new IllegalStateException("No OrthogonalEdgeRouter in coreLayouter");
    }
    if ((i2 != 0) || (!a(paramo, localg)))
    {
      a().doLayout(paramo);
      return;
    }
    a.c.k localk1 = paramo.c(ad.q);
    a.c.k localk2 = paramo.c(ad.r);
    n localn1 = a(paramo, localk1);
    n localn2 = a(paramo, localk2);
    a.c.k localk3 = paramo.c(ed.a);
    a.c.k localk4 = paramo.c(ed.b);
    if (((i2 != 0) || (localk1 == null)) && ((i2 != 0) || (localk2 == null)) && ((i2 != 0) || ((localk3 != null) || (localk4 != null))))
    {
      localObject1 = paramo.w();
      do
      {
        if (!((m)localObject1).e()) {
          break;
        }
        localObject2 = ((m)localObject1).a();
        localObject3 = (cd)localk3.get(localObject2);
        if (i2 == 0) {
          if (localObject3 != null)
          {
            localObject4 = ad.a((cd)localObject3);
            if (((cd)localObject3).a())
            {
              localObject5 = paramo.p((d)localObject2);
              localObject4 = ad.a(((a.d.w)localObject5).a, ((a.d.w)localObject5).b, ((ad)localObject4).a());
            }
            localObject5 = new z();
            ((z)localObject5).add(localObject4);
            localn1.a(localObject2, localObject5);
          }
        }
        localObject4 = (cd)localk4.get(localObject2);
        if (i2 == 0)
        {
          if (localObject4 != null)
          {
            localObject5 = ad.a((cd)localObject4);
            if (((cd)localObject4).a())
            {
              localObject6 = paramo.q((d)localObject2);
              localObject5 = ad.a(((a.d.w)localObject6).a, ((a.d.w)localObject6).b, ((ad)localObject5).a());
            }
            localObject6 = new z();
            ((z)localObject6).add(localObject5);
            localn2.a(localObject2, localObject6);
          }
          ((m)localObject1).f();
        }
      } while (i1 == 0);
    }
    Object localObject1 = new b_(paramo);
    ((b_)localObject1).a();
    Object localObject2 = paramo.c(ed.d);
    Object localObject3 = new z();
    Object localObject4 = new HashMap();
    Object localObject5 = paramo.v();
    label422:
    label588:
    do
    {
      do
      {
        if (!((a.c.w)localObject5).e()) {
          break;
        }
        localObject6 = ((a.c.w)localObject5).d();
        do
        {
          ((Map)localObject4).clear();
          if (i1 != 0) {
            break label724;
          }
          localObject7 = ((a.c.e)localObject6).m();
          do
          {
            if (!((m)localObject7).e()) {
              break label588;
            }
            localObject8 = ((m)localObject7).a();
            localObject9 = null;
            if (i2 != 0) {
              break label422;
            }
            if (i1 != 0) {
              break;
            }
            if (((i2 != 0) || (localObject2 != null)) && ((localObject9 = ((a.c.k)localObject2).get(localObject8)) != null))
            {
              if (i2 != 0) {
                continue;
              }
              if (!((d)localObject8).g())
              {
                localObject10 = (ab)((Map)localObject4).get(localObject9);
                if (i2 == 0) {
                  if (localObject10 == null)
                  {
                    localObject10 = new ab();
                    ((Map)localObject4).put(localObject9, localObject10);
                  }
                }
                ((ab)localObject10).add(localObject8);
              }
            }
            ((m)localObject7).f();
          } while (i1 == 0);
        } while (i2 != 0);
        localObject7 = ((Map)localObject4).values().iterator();
        do
        {
          do
          {
            do
            {
              if (!((Iterator)localObject7).hasNext()) {
                break;
              }
              localObject8 = (ab)((Iterator)localObject7).next();
            } while (((ab)localObject8).size() <= 1);
            ((z)localObject3).add(localObject8);
            if ((i2 != 0) || (i2 != 0)) {
              break label680;
            }
            if (i1 != 0) {
              break label678;
            }
          } while (i2 != 0);
        } while (i1 == 0);
        ((a.c.w)localObject5).f();
      } while (i1 == 0);
    } while (i2 != 0);
    label678:
    label680:
    if (((z)localObject3).isEmpty())
    {
      ((b_)localObject1).c();
      paramo.a(localn1);
      paramo.a(localn2);
      a().doLayout(paramo);
      return;
    }
    label724:
    localObject5 = a.i.db.a();
    Object localObject6 = a.i.db.a();
    paramo.a(g, (a.c.k)localObject5);
    ((b_)localObject1).a(localn1, localn2);
    paramo.a(ad.q, localn1);
    paramo.a(ad.r, localn2);
    if (i2 == 0) {
      if (paramo.c(ed.a) != null) {
        paramo.j(ed.a);
      }
    }
    if ((i2 != 0) || (paramo.c(ed.b) != null)) {
      paramo.j(ed.b);
    }
    Object localObject7 = new db(paramo, localg);
    ((db)localObject7).c();
    Object localObject8 = ((db)localObject7).a();
    Object localObject9 = new a.i.y(paramo);
    ((a.i.y)localObject9).b();
    Object localObject10 = new d_();
    Object localObject11 = ((z)localObject3).h();
    label870:
    if (((a.c.y)localObject11).e()) {}
    Object localObject13;
    Object localObject14;
    Object localObject15;
    Object localObject16;
    label989:
    Object localObject17;
    Object localObject18;
    Object localObject19;
    label1209:
    label1210:
    label1344:
    label1609:
    Object localObject20;
    label1468:
    label1472:
    label1659:
    do
    {
      byte b;
      do
      {
        localObject12 = (ab)((a.c.y)localObject11).j();
        localObject13 = a(((ab)localObject12).l(), true);
        do
        {
          localObject14 = new ab();
          if (i1 != 0) {
            break label2364;
          }
          localObject15 = ((ab)localObject12).l();
          do
          {
            do
            {
              if (!((m)localObject15).e()) {
                break label989;
              }
              localObject16 = ((m)localObject15).a();
              if (i1 != 0) {
                break;
              }
              if (localObject8 != null)
              {
                if (i2 != 0) {
                  continue;
                }
                if (((n)localObject8).getBool(localObject16)) {
                  ((ab)localObject14).add(localObject16);
                }
              }
              ((m)localObject15).f();
            } while (i1 == 0);
          } while (i2 != 0);
          if (i2 == 0)
          {
            if (((ab)localObject14).isEmpty())
            {
              ((ab)localObject12).clear();
              ((bb)localObject13).clear();
            }
          }
          else
          {
            if (i2 != 0) {
              break label2327;
            }
            if (i1 == 0) {
              break label2318;
            }
          }
          localObject15 = null;
          localObject16 = ((ab)localObject12).m().f();
          localObject17 = null;
          localObject18 = null;
          if (localObject15 != null)
          {
            b = u.a(paramo, (a.c.e)localObject16, (z)localObject15);
            localObject19 = (a.d.w)((z)localObject15).a();
            localObject17 = new Point2D.Double(((a.d.w)localObject19).a, ((a.d.w)localObject19).b);
          }
          else
          {
            b = u.a(paramo, (a.c.e)localObject16, (ab)localObject12);
          }
          localObject19 = u.a(paramo, (a.c.e)localObject16, (bb)localObject13, b, this.k);
          m localm = ((ab)localObject12).l();
          do
          {
            if (!localm.e()) {
              break;
            }
            d locald1 = localm.a();
            if (i2 != 0) {
              break label1210;
            }
            if (i1 != 0) {
              break label1209;
            }
            if (!((bb)localObject19).contains(locald1.e()))
            {
              ((ab)localObject12).b(localm);
              ((bb)localObject13).remove(locald1.e());
            }
            localm.f();
          } while (i1 == 0);
        } while (i2 != 0);
        if (((ab)localObject12).size() <= 1) {
          break label2318;
        }
        a.i.y.a(paramo, ((ab)localObject12).l());
        if (localObject15 != null) {
          break label1609;
        }
        if (i2 == 0) {}
        switch (b)
        {
        case 2: 
          ((d_)localObject10).a((byte)0);
          if (i2 != 0) {
            break label1344;
          }
          if (i1 == 0) {
            break;
          }
        case 1: 
          ((d_)localObject10).a((byte)2);
          if (i2 != 0) {
            break label1344;
          }
          if (i1 == 0) {
            break;
          }
        case 4: 
          ((d_)localObject10).a((byte)1);
          if (i2 != 0) {
            break label1344;
          }
          if (i1 == 0) {
            break;
          }
        case 8: 
          ((d_)localObject10).a((byte)3);
        }
        ((d_)localObject10).c(paramo);
        localObject18 = u.a(paramo, (a.c.e)localObject16, (bb)localObject19, (byte)2);
        double d1 = paramo.m((a.c.e)localObject16);
        d locald2 = ((ab)localObject12).m();
        a.c.k localk5 = paramo.c(ad.r);
        if (i2 == 0)
        {
          if (localk5 != null)
          {
            ad localad1 = a((Collection)localk5.get(locald2));
            if (i2 != 0) {
              break label1468;
            }
            if (localad1 != null)
            {
              if (i2 != 0) {
                break label1472;
              }
              if (localad1.b()) {
                d1 = paramo.m(locald2.f()) + localad1.c();
              }
            }
          }
          if (i2 != 0) {
            break label1577;
          }
          localObject17 = new Point2D.Double(d1, ((Rectangle2D)localObject18).getMaxY());
        }
        if (localg.H())
        {
          double d4 = Math.max(this.k, localg.J());
          int m = (int)Math.floor((((Point2D.Double)localObject17).y - d4) / localg.J());
          ((Point2D.Double)localObject17).y = (m * localg.J());
          do
          {
            if (((Point2D.Double)localObject17).y >= ((Rectangle2D)localObject18).getMinY()) {
              break label1609;
            }
            localObject17.y += Math.max(1, localg.J());
            if ((i2 == 0) && (i1 != 0)) {
              break;
            }
          } while (i1 == 0);
        }
      } while (i2 != 0);
      localObject17.y -= Math.min(((Rectangle2D)localObject18).getHeight() / 2.0D, Math.max(this.k, localg.K()));
      localObject20 = paramo.i();
      if (i2 == 0) {
        if (b != 1)
        {
          if (i2 == 0) {
            if (b != 2) {
              break label1659;
            }
          }
        }
        else {
          ((x)localObject5).a(localObject20, i);
        }
      }
      if (i2 == 0) {
        if (i1 != 0) {
          ((x)localObject5).a(localObject20, h);
        }
      }
      double d2 = localg.K();
      double d3 = 0.5D * localg.K();
      d3 = Math.max(d3, 2.0D);
      d2 = Math.max(d2, 4.0D);
      paramo.b((a.c.e)localObject20, d2, d3);
      paramo.a((a.c.e)localObject20, ((Point2D.Double)localObject17).x, ((Point2D.Double)localObject17).y);
      ((x)localObject6).a(localObject20, localObject18);
      d locald3 = paramo.a((a.c.e)localObject20, (a.c.e)localObject16);
      Object localObject22;
      Object localObject23;
      if (i2 == 0) {
        if (localObject15 == null)
        {
          localObject21 = new z();
          localObject22 = ad.a(cd.a((byte)0, true));
          ((z)localObject21).add(localObject22);
          localn1.a(locald3, localObject21);
          localObject23 = a((Collection)localn2.get(((ab)localObject12).m()));
          if (localObject23 != null)
          {
            localObject24 = new z();
            ((z)localObject24).add(localObject23);
            localn2.a(locald3, localObject24);
          }
          Object localObject24 = paramo.s(((ab)localObject12).m());
          paramo.d(locald3, (a.d.w)localObject24);
          if (i2 != 0) {
            break label1943;
          }
          ((ab)localObject12).m();
          if (localObject8 == null) {
            break label1941;
          }
          ((n)localObject8).a(locald3, true);
          if (i2 == 0) {
            if (i1 == 0) {
              break label1941;
            }
          }
        }
        else
        {
          paramo.a(locald3, (z)localObject15);
        }
      }
      if ((i2 != 0) || (localObject8 != null)) {
        ((n)localObject8).a(locald3, false);
      }
      Object localObject21 = ((ab)localObject12).l();
      do
      {
        if (!((m)localObject21).e()) {
          break;
        }
        localObject22 = ((m)localObject21).a();
        localObject23 = null;
        if (i1 != 0) {
          break label2183;
        }
        if ((localObject15 != null) && ((i2 != 0) || (localObject8 != null)) && (!((n)localObject8).getBool(localObject22)))
        {
          localObject23 = paramo.o((d)localObject22);
          int n = 0;
          do
          {
            do
            {
              if (n >= ((z)localObject15).size() - 1) {
                break;
              }
              if (i2 != 0) {
                break label2081;
              }
              ((z)localObject23).e();
              n++;
              if (i1 != 0) {
                break label2079;
              }
            } while (i1 == 0);
          } while (i2 != 0);
          if (((z)localObject23).size() < 2) {
            localObject23 = null;
          }
        }
        paramo.a((d)localObject22, ((d)localObject22).e(), (a.c.e)localObject20);
        if (i2 == 0)
        {
          if (localObject23 != null) {
            paramo.a((d)localObject22, (z)localObject23);
          }
          paramo.b((d)localObject22, a.d.w.c);
        }
        z localz = new z();
        ad localad2 = ad.a(cd.a((byte)0, true));
        localz.add(localad2);
        localn2.a(localObject22, localz);
        if (i2 == 0)
        {
          if (localObject8 != null) {
            ((n)localObject8).a(localObject22, true);
          }
          ((m)localObject21).f();
        }
      } while (i1 == 0);
      if ((i2 == 0) && (localObject15 == null)) {
        ((d_)localObject10).i(paramo);
      }
      localObject21 = ((a.c.e)localObject20).m();
      do
      {
        if (!((m)localObject21).e()) {
          break label2242;
        }
        paramo.f(((m)localObject21).a());
        ((m)localObject21).f();
        if ((i2 == 0) && (i1 != 0)) {
          break;
        }
      } while (i1 == 0);
      if (i2 != 0) {
        break label870;
      }
      localObject21 = ((bb)localObject13).l();
      do
      {
        if (!((a.c.w)localObject21).e()) {
          break label2306;
        }
        if (i1 != 0) {
          break;
        }
        if (paramo.h(((a.c.w)localObject21).d())) {
          paramo.d(((a.c.w)localObject21).d());
        }
        ((a.c.w)localObject21).f();
      } while (i1 == 0);
      if (i2 == 0)
      {
        ((a.i.y)localObject9).a((a.c.e)localObject20);
        ((a.c.y)localObject11).f();
        if (i1 == 0) {
          break;
        }
      }
      ((a.i.y)localObject9).g();
      a(paramo, (x)localObject5, (x)localObject6, i);
    } while (i2 != 0);
    label1577:
    label2242:
    a(paramo, (x)localObject5, (x)localObject6, h);
    label1941:
    label1943:
    label2079:
    label2081:
    label2364:
    localObject11 = new a_();
    label2183:
    label2318:
    label2327:
    ((a_)localObject11).a(paramo, (a.c.k)localObject5);
    label2306:
    a().doLayout(paramo);
    ((a_)localObject11).a(paramo);
    Object localObject12 = ((z)localObject3).h();
    label2613:
    do
    {
      if (!((a.c.y)localObject12).e()) {
        break;
      }
      localObject13 = (ab)((a.c.y)localObject12).j();
      if (i2 == 0)
      {
        if (i1 != 0) {
          break label2917;
        }
        if (i2 != 0) {}
      }
      else
      {
        if (((ab)localObject13).size() <= 1) {
          break label2849;
        }
      }
      localObject14 = ((ab)localObject13).m().f();
      localObject15 = ((a.c.e)localObject14).h();
      localObject16 = paramo.o((d)localObject15);
      localObject17 = (a.d.w)((z)localObject16).b();
      a.d.w localw = (a.d.w)((z)localObject16).a();
      do
      {
        if (((x)localObject5).get(localObject14) == i)
        {
          if (i2 == 0)
          {
            if (u.b((a.d.w)localObject17, localw)) {
              ((z)localObject16).b();
            }
            localw = new a.d.w(localw.a, paramo.n((a.c.e)localObject14));
            if (i2 != 0) {
              break label2613;
            }
          }
          if (i1 == 0) {}
        }
        else
        {
          if (i2 == 0) {
            if (u.a((a.d.w)localObject17, localw)) {
              ((z)localObject16).b();
            }
          }
          localw = new a.d.w(paramo.m((a.c.e)localObject14), localw.b);
        }
        ((z)localObject16).a(localw);
        localObject18 = ((ab)localObject13).l();
        do
        {
          if (!((m)localObject18).e()) {
            break label2838;
          }
          localObject19 = ((m)localObject18).a();
          localObject20 = paramo.o((d)localObject19);
          localObject17 = (a.d.w)((z)localObject20).e();
          localObject14 = ((d)localObject19).f();
          localw = (a.d.w)((z)localObject20).d();
          if (i1 != 0) {
            break;
          }
          if (((x)localObject5).get(localObject14) == i)
          {
            if (i2 == 0)
            {
              if (u.b((a.d.w)localObject17, localw)) {
                ((z)localObject20).e();
              }
              localw = new a.d.w(localw.a, paramo.n((a.c.e)localObject14));
            }
            if (i2 != 0) {
              continue;
            }
            if (i1 == 0) {}
          }
          else
          {
            if (i2 == 0) {
              if (u.a((a.d.w)localObject17, localw)) {
                ((z)localObject20).e();
              }
            }
            localw = new a.d.w(paramo.m((a.c.e)localObject14), localw.b);
          }
          ((z)localObject20).b(localw);
          ((z)localObject20).addAll((Collection)localObject16);
          paramo.a((d)localObject19, ((d)localObject19).e(), ((d)localObject15).f());
          paramo.a((d)localObject19, (z)localObject20);
          ((m)localObject18).f();
        } while (i1 == 0);
      } while (i2 != 0);
      paramo.a((a.c.e)localObject14);
      ((a.c.y)localObject12).f();
    } while (i1 == 0);
    label2838:
    label2849:
    a(paramo, paramo.w());
    paramo.j(g);
    ((b_)localObject1).c();
    ((db)localObject7).f();
    paramo.a(localn1);
    paramo.a(localn2);
    paramo.j(ad.q);
    if (i2 == 0)
    {
      paramo.j(ad.r);
      label2917:
      if (i2 == 0) {
        if (localk1 != null) {
          paramo.a(ad.q, localk1);
        }
      }
      if (i2 == 0) {
        if (localk2 != null) {
          paramo.a(ad.r, localk2);
        }
      }
      if (i2 == 0) {
        if (localk3 != null) {
          paramo.a(ed.a, localk3);
        }
      }
      if (localk4 == null) {}
    }
    else
    {
      paramo.a(ed.b, localk4);
    }
  }
  
  private ad a(Collection paramCollection)
  {
    int n = g.Cc;
    int m = g.Bc;
    if (((n == 0) && (paramCollection == null)) || (paramCollection.isEmpty())) {
      return null;
    }
    Object localObject = null;
    Iterator localIterator = paramCollection.iterator();
    while (localIterator.hasNext())
    {
      ad localad = (ad)localIterator.next();
      if (n == 0) {
        if (localObject == null) {
          localObject = localad;
        }
      }
      if (!localad.b())
      {
        if ((n != 0) || (m != 0)) {
          break label96;
        }
        localObject = localad;
      }
    }
    label96:
    return localObject;
  }
  
  bb a(m paramm, boolean paramBoolean)
  {
    int n = g.Cc;
    int m = g.Bc;
    bb localbb;
    do
    {
      localbb = new bb();
      while (m == 0)
      {
        if (!paramm.e()) {
          break;
        }
        if ((n == 0) && (m != 0)) {
          break label84;
        }
        localbb.add(paramBoolean ? paramm.a().e() : paramm.a().f());
        paramm.f();
      }
    } while (n != 0);
    label84:
    return localbb;
  }
  
  g c()
  {
    int n = g.Cc;
    int m = g.Bc;
    do
    {
      rc localrc = a();
      while (m == 0)
      {
        if (!(localrc instanceof vc)) {
          break;
        }
        if (n == 0)
        {
          if ((localrc instanceof g)) {
            return (g)localrc;
          }
          localrc = ((vc)localrc).a();
        }
      }
    } while (n != 0);
    return null;
  }
  
  void a(ab paramab, bb parambb, o paramo)
  {
    int n = g.Cc;
    int m = g.Bc;
    label14:
    do
    {
      if (paramab.isEmpty()) {
        break;
      }
      break;
      paramo.f(paramab.o());
      if ((n == 0) && (m != 0)) {
        break label65;
      }
    } while (m == 0);
    label60:
    label65:
    while (n != 0)
    {
      break label60;
      if (n != 0) {
        break label14;
      }
      if (!parambb.isEmpty())
      {
        paramo.d(parambb.o());
        if (m == 0) {
          break;
        }
      }
    }
  }
  
  boolean a(o paramo, g paramg)
  {
    return (g.Cc == 0) && ((paramo.c(ed.c) != null) || (paramo.c(ed.d) != null));
  }
  
  n a(o paramo, a.c.k paramk)
  {
    int n = g.Cc;
    int m = g.Bc;
    n localn = paramo.C();
    if (paramk != null)
    {
      m localm = paramo.w();
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        if (n == 0)
        {
          if (m != 0) {
            break label83;
          }
          localn.a(locald, paramk.get(locald));
          localm.f();
        }
      } while (m == 0);
    }
    label83:
    return localn;
  }
  
  n b(o paramo, a.c.k paramk)
  {
    int n = g.Cc;
    int m = g.Bc;
    n localn = paramo.C();
    if (paramk != null)
    {
      m localm = paramo.w();
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        if (n == 0)
        {
          if (m != 0) {
            break label83;
          }
          localn.a(locald, paramk.getBool(locald));
          localm.f();
        }
      } while (m == 0);
    }
    label83:
    return localn;
  }
  
  x c(o paramo, a.c.k paramk)
  {
    int n = g.Cc;
    int m = g.Bc;
    x localx = paramo.B();
    if (paramk != null)
    {
      a.c.w localw = paramo.v();
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        if (n == 0)
        {
          if (m != 0) {
            break label83;
          }
          localx.a(locale, paramk.getBool(locale));
          localw.f();
        }
      } while (m == 0);
    }
    label83:
    return localx;
  }
  
  static void a(o paramo, m paramm)
  {
    int i1 = g.Cc;
    int n = g.Bc;
    label161:
    do
    {
      if (!paramm.e()) {
        break;
      }
      d locald = paramm.a();
      z localz = paramo.o(locald);
      v localv = localz.f();
      Object localObject1 = (a.d.w)localv.c();
      localv = localv.a();
      Object localObject2 = (a.d.w)localv.c();
      int m = 0;
      localv = localv.a();
      do
      {
        if (localv == null) {
          break;
        }
        a.d.w localw = (a.d.w)localv.c();
        if (n != 0) {
          break label161;
        }
        if (a.d.k.d((a.d.w)localObject1, (a.d.w)localObject2, localw))
        {
          localz.h(localv.b());
          localObject2 = localw;
          m = 1;
          if (i1 != 0) {
            continue;
          }
          if (n == 0) {}
        }
        else
        {
          localObject1 = localObject2;
          localObject2 = localw;
        }
        localv = localv.a();
      } while (n == 0);
      if (i1 == 0)
      {
        if (m != 0) {
          paramo.a(locald, localz);
        }
        paramm.f();
      }
    } while (n == 0);
  }
  
  void a(o paramo, x paramx1, x paramx2, Object paramObject)
  {
    int n = g.Cc;
    int m = g.Bc;
    q localq = new q();
    x localx = localq.B();
    Object localObject1 = paramo.v();
    a.c.e locale;
    Object localObject3;
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (n == 0)
      {
        if ((paramx1.get(localObject2) == paramObject) && (paramx2.get(localObject2) != null))
        {
          locale = localq.i();
          localx.a(locale, localObject2);
          localObject3 = (Rectangle2D)paramx2.get(localObject2);
          if (n == 0)
          {
            if (paramObject == i)
            {
              localq.b(locale, ((Rectangle2D)localObject3).getWidth(), paramo.t((a.c.e)localObject2));
              localq.c(locale, ((Rectangle2D)localObject3).getX(), paramo.q((a.c.e)localObject2));
              if (n != 0) {
                continue;
              }
              if (m == 0) {}
            }
            else
            {
              localq.b(locale, paramo.s((a.c.e)localObject2), ((Rectangle2D)localObject3).getWidth());
            }
          }
          else {
            localq.c(locale, paramo.p((a.c.e)localObject2), ((Rectangle2D)localObject3).getX());
          }
        }
        ((a.c.w)localObject1).f();
      }
    } while (m == 0);
    localObject1 = new l();
    ((l)localObject1).b(true);
    ((l)localObject1).a(5.0D);
    ((l)localObject1).doLayout(localq);
    Object localObject2 = localq.v();
    do
    {
      if (!((a.c.w)localObject2).e()) {
        break;
      }
      locale = ((a.c.w)localObject2).d();
      localObject3 = (a.c.e)localx.get(locale);
      if (n == 0)
      {
        if (localObject3 != null) {
          if (paramObject == i)
          {
            paramo.c((a.c.e)localObject3, paramo.p((a.c.e)localObject3), localq.q(locale));
            if (n != 0) {
              continue;
            }
            if (m == 0) {}
          }
          else
          {
            paramo.c((a.c.e)localObject3, localq.p(locale), paramo.q((a.c.e)localObject3));
          }
        }
        ((a.c.w)localObject2).f();
      }
    } while (m == 0);
  }
  
  z a(o paramo, ab paramab, Object paramObject)
  {
    int i1 = g.Cc;
    int n = g.Bc;
    a.c.k localk = paramo.c(paramObject);
    z localz1 = new z();
    Object localObject1 = paramab.l();
    do
    {
      do
      {
        if (!((m)localObject1).e()) {
          break;
        }
        if ((i1 != 0) || (localk != null))
        {
          if (i1 != 0) {
            continue;
          }
          if (!localk.getBool(((m)localObject1).a()))
          {
            z localz2 = paramo.o(((m)localObject1).a());
            if (i1 != 0) {
              continue;
            }
            if (localz2.size() > 2)
            {
              localz2.j();
              localz1.add(localz2);
            }
          }
        }
        ((m)localObject1).f();
      } while (n == 0);
    } while (i1 != 0);
    if (i1 == 0)
    {
      if (localz1.size() > 1) {
        if (i1 != 0) {
          break label171;
        }
      }
    }
    else {
      if (localz1.size() != paramab.size()) {
        break label164;
      }
    }
    return null;
    label164:
    label171:
    localObject1 = new z();
    int m = 0;
    label301:
    label320:
    do
    {
      Object localObject2;
      do
      {
        do
        {
          if (m != 0) {
            break;
          }
          localObject2 = null;
          a.c.y localy = localz1.h();
          do
          {
            if (!localy.e()) {
              break;
            }
            if (n != 0) {
              break label320;
            }
            if (m != 0) {
              break;
            }
            z localz3 = (z)localy.j();
            if (i1 == 0) {
              if (localz3.isEmpty())
              {
                m = 1;
                if (i1 != 0) {
                  continue;
                }
                if (n == 0) {
                  break label301;
                }
              }
            }
            a.d.w localw = (a.d.w)localz3.b();
            if (i1 == 0) {
              if (localObject2 == null)
              {
                localObject2 = localw;
                if (i1 != 0) {
                  continue;
                }
                if (n == 0) {
                  break label301;
                }
              }
            }
            if (i1 == 0)
            {
              if (!localObject2.equals(localw)) {
                m = 1;
              }
              localy.f();
            }
          } while (n == 0);
        } while ((i1 != 0) || (m != 0));
      } while (localObject2 == null);
      ((z)localObject1).add(localObject2);
      if (i1 != 0) {
        break label356;
      }
    } while (n == 0);
    if (i1 == 0) {
      label356:
      if (((z)localObject1).size() > 1) {
        ((z)localObject1).j();
      }
    } else {
      return localObject1;
    }
    return null;
  }
  
  static class a_
  {
    a.c.k a;
    
    void a(o paramo, a.c.k paramk)
    {
      this.a = paramo.c(i.a);
      if (this.a != null)
      {
        e.2 local2 = new e.2(this, paramk);
        paramo.a(i.a, local2);
      }
    }
    
    void a(o paramo)
    {
      if (this.a != null) {
        paramo.a(i.a, this.a);
      }
    }
  }
  
  static class b_
  {
    o a;
    a.c.k b;
    a.c.k c;
    ab d;
    n e;
    n f;
    
    b_(o paramo)
    {
      this.a = paramo;
    }
    
    void a()
    {
      int k = g.Cc;
      int j = g.Bc;
      this.d = new ab();
      this.c = this.a.c(ed.d);
      this.b = this.a.c(ed.c);
      this.e = this.a.C();
      this.f = this.a.C();
      this.a.a(ed.d, this.e);
      this.a.a(ed.c, this.f);
      HashMap localHashMap = new HashMap();
      int i = 0;
      m localm = this.a.w();
      label201:
      label355:
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        if (k == 0) {
          if (this.c != null)
          {
            if (k != 0) {
              break label201;
            }
            if (this.c.get(locald) != null)
            {
              this.e.a(locald, this.c.get(locald));
              if (k != 0) {
                continue;
              }
              if (j == 0) {
                break label355;
              }
            }
          }
        }
        if (k == 0) {}
        Object localObject1 = this.b == null ? null : this.b.get(locald);
        if (k == 0)
        {
          if (localObject1 != null)
          {
            Object localObject2 = localHashMap.get(localObject1);
            if (k == 0)
            {
              if (localObject2 == null)
              {
                localObject2 = nb.a(localObject1, "" + i);
                i++;
                localHashMap.put(localObject1, localObject2);
              }
              this.e.a(locald, localObject2);
            }
            z localz = this.a.o(locald);
            localz.j();
            this.a.e(locald);
            this.a.a(locald, localz);
            this.d.add(locald);
          }
          localm.f();
        }
      } while (j == 0);
    }
    
    void c()
    {
      int j = g.Cc;
      int i = g.Bc;
      m localm = this.d.l();
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        z localz = this.a.o(locald);
        localz.j();
        this.a.e(locald);
        if (j != 0) {
          break label111;
        }
        this.a.a(locald, localz);
        localm.f();
        if (i != 0) {
          break label110;
        }
      } while (i == 0);
      this.a.j(ed.c);
      if (j == 0)
      {
        this.a.j(ed.d);
        label110:
        label111:
        if (j == 0)
        {
          if (this.b != null) {
            this.a.a(ed.c, this.b);
          }
          if (j != 0) {
            break label174;
          }
        }
        if (this.c == null) {}
      }
      else
      {
        this.a.a(ed.d, this.c);
      }
      this.a.a(this.f);
      label174:
      this.a.a(this.e);
    }
    
    public void a(n paramn1, n paramn2)
    {
      int i = g.Bc;
      m localm = this.d.l();
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        Object localObject = paramn1.get(locald);
        paramn1.a(locald, paramn2.get(locald));
        paramn2.a(locald, localObject);
        localm.f();
      } while (i == 0);
    }
  }
  
  static class d_
    extends cb
  {
    protected void c(o paramo)
    {
      super.c(paramo);
    }
    
    protected void i(o paramo)
    {
      super.i(paramo);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.e

 * JD-Core Version:    0.7.0.1

 */